
  function(map_duplicate source)
    map_new()
    ans(duplicate)
    map_keys("${source}")
    ans(keys)
    foreach(key ${keys})
      map_tryget("${source}" "${key}")
      ans(val)
      map_set_hidden("${duplicate}" "${key}" ${val})
    endforeach()
    map_keys_set("${duplicate}" ${keys})
    return_ref(duplicate)
  endfunction()